package problem5;


import java.util.*;

public class TestArrayListTools {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = input.nextInt();
        }
        ArrayList<Integer> list = ArrayListTools.arrayToArrayList(arr);
        System.out.println(list.toString());
        System.out.println("max is " + ArrayListTools.getMax(list));
        System.out.println("min is " + ArrayListTools.getMin(list));
        System.out.println("sum is " + ArrayListTools.getSum(list));
        System.out.println("avg is " + ArrayListTools.getAvg(list));
        ArrayListTools.sort(list);
        System.out.println(list.toString());
    }
}